#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @File : createCookies.py
# @Autor: FY
# @Date: 2021/8/30
from selenium import webdriver
from time import sleep
import yaml


def test_getCookie():
    driver = webdriver.Chrome()
    driver.get("https://work.weixin.qq.com/wework_admin/loginpage_wx")
    sleep(100)
    cookies = driver.get_cookies()
    with open("./cookies.yaml", "w") as f:
        yaml.safe_dump(cookies, f)

